package com.mooo;

import java.util.Scanner;

public class a05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //获取顾客四位卡号
        System.out.println("请您输入四位数字，作为您的会员卡号");
        int num = sc.nextInt();
        //判断录入的数据是否合规
        if (num < 1000 || num > 9999) {
            System.out.println("您输入的数字有误，请仔细检查");
        } else {
            int ge = num % 10;
            int shi = num / 10 % 10;
            int bai = num / 100 % 10;
            int qian = num / 1000 % 10;
            int wan = num / 10000 % 10;
            int add = ge + shi + bai + qian + wan;
            if (add>20){
                System.out.println("恭喜您，为我们的幸运客户");
            }else{
                System.out.println("很遗憾，您不是幸运用户");
            }
        }
    }
}
